let db = require('../db/index')

exports.get = (req, res) => {        //通过name更新数据
    var sql = 'update user set address = ?, phone = ? where name = ?'
    db.query(sql, [req.query.address, req.query.phone, req.query.name], (err, data) => {
        if(err) {
            return res.send('错误：' + err.message)
        }
        res.send(data)
    })
}